bitkeeper revision 1.1159.258.109 (4271591efy8CDaEUexiC4RrOlWxDNg)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 28 Apr 2005 21:43:58 +0000 (21:43 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 28 Apr 2005 21:43:58 +0000 (21:43 +0000)
Backport of bugfix to ensure that p2m entries are invalidated
before returning memory back to Xen allocation pool.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6.11-xen-sparse/arch/xen/i386/mm/hypervisor.c

index 022831606a46c915b4babb786c6f37fa2975a8fb..6c223c79e16d30ce582819624dc84004ecc386c3 100644 (file)
@@ -378,7 +378,8 @@ unsigned long allocate_empty_lowmem_region(unsigned long pages)
         pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
         pfn_array[i] = pte->pte_low >> PAGE_SHIFT;
         queue_l1_entry_update(pte, 0);
-        phys_to_machine_mapping[__pa(vstart)>>PAGE_SHIFT] = INVALID_P2M_ENTRY;
+        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
+            INVALID_P2M_ENTRY;
     }
 
     /* Flush updates through and flush the TLB. */